home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Diamond Collection
/
The Diamond Collection (Software Vault)(Digital Impact).ISO
/
cdr23
/
csmac13a.zip
/
CS-LOGON.CSM
< prev
next >
Wrap
Text File
|
1995-01-22
|
55KB
|
1,234 lines
┌────────────────────────────────┐
│ Chuck Seyboldt's COMMO Macro │ CS-MAC13A:CS-LOGON.CSM
└────────────────────────────────┘ Copyright (c) 1995
* All rights reserved
*
* Contents: Generic logon routine (:glr)
* Test for ACTION (and call to CS-ACTON.CSM)
* Get NEWFILES list if %flag contains "n"
* Getting to mail door
* Rename .QWK packets
* Test for .REP
* Strew files from Hold directory (optional)
*
* Called from: CS-TABLE.CSM
*
* Control passes to: CS-ACTON.CSM,action (if ACTION.%abbr exists)
* CS-COMMO.CSM,fon_dial(multi-dialer routine)
*
* The file you are reading does *NOT* require editing.
*
*** BBSID particulars need to be added to COMMO.FON.
*
* This file contains a logon macro.
* It is designed to get you quickest to the "Main BBS Command?"
* prompt. BBSware specific prompts are delivered from CS-TABLE.CSM.
* After logon, a MAILRUN is made. If the Commo variable %MAIL is
* empty, control passes back to CS-COMMO.CSM.
*
* This works for PCBoards, for the RBBS run by Jim Goodenough,
* Directory Assistance (1,707 823-9516), for Jeff Oberlee's
* Charlies Foxhole BBS running MACROBBS (1,517 323-3405), for
* Wildcat! boards, and for Bob Mahoney's Exec-PC BBS. More
* BBS types are accomodated by expanding CS-TABLE.CSM. In
* general, turn any BBS HOTKEY option to OFF.
┌─────────────────────────────┐
│ Standard Online Responses │ (For the Generic Logon Routine)
└─────────────────────────────┘
* Responses to common logging-on prompts.
* :name sends first plus last name with one carriage return.
* :alias sends your alias which may be in effect for one call
* :f&l sends "first name <CR>", delays, then sends "last name <CR>"
* :handle sends your handle rather than your name
* Notice that I have a different response to the "First name?"
* prompt for the BBS called Directory Assistance.
{:retu} {comp debug} ;check %debug
{ifco ,stamp} ;if NUL, go on; else goto :stamp}
{retu} ;Handy label and function assignment
{:stamp}{incr db_ct} ;stamp for debugging
{disp ,,,## %_24h%:%_min%:%_sec% CS-LOGON ##%db_ct##} {retu}
{:name} {comp alias} {ifco ,alias}
{comp ql,y}{ifco qlog} ;Do QuickLogOn if %ql=y
{send ~%name|} {retu}
{:alias}{send ~%alias|}{retu}
{:qlog} {setv ql} ;clear "ql" for single dial
{comp qlo} {ifco name} ;error trap
{send ~%qlo} ;%qlo in CS-TABLE needs <CR>
{setv qlo}
{goto qlo_1} ;logged-on
{:f&l} {comp alias} {ifco-c ,a2n}
{inst name, } ;find "space" in name
{setv pos,%_pos} {decr pos}
{subs first,1,%pos,%name}
{leng %name} {incr pos,2}
{subs last,%pos,%_len,%name}
{send ~%first|~~~~~%last|} ;Send first and last name 2.5 sec apart
{setv first} ;reset variables
{setv last}
{comp alias} {ifco-c ,n2a}
{retu}
{:a2n} {setv sav,%name} {setv name,%alias} {retu}
{:n2a} {setv name,%sav} {setv sav} {retu}
{:handle}
{comp alias} {ifco ,alias}
{send ~%handle|} {goto retu} ;Send %handle
{:lov} {send ~%v_ph%|} {goto retu} ;Voice Phone Number verification
{:lod} {send ~%d_ph%|} {goto retu} ;Data Phone Number verification
{:lob} {send ~%b_day%%rs} {goto retu} ;Birthday verification
{:loq} {send %color %fast|}{goto retu} ;choose ANSI colors "Y/n"
{:bbs} {send ~bbs|} {goto retu}
{:_} {send ~ } {goto retu} ;this is how to send "SpaceBar"
{:|} {send ~|} {goto retu}
{:_|} {send ~ |} {goto retu}
{:a|} {send ~a|} {goto retu}
{:c|} {send ~c|} {goto retu}
{:g|} {send ~g|} {goto retu}
{:n} {send ~n} {goto retu}
{:n|} {send ~n|} {goto retu}
{:q} {send ~q} {goto retu}
{:q|} {send ~q|} {goto retu}
{:s} {send ~s} {goto retu}
{:s|} {send ~s|} {goto retu}
{:u|} {send ~u|} {goto retu}
{:y} {send ~y} {goto retu}
{:y|} {send ~y|} {goto retu}
{:z} {send ~z} {goto retu}
{:z|} {send ~z|} {goto retu}
{:0|} {send ~0|} {goto retu}
{:5|} {send ~5|} {goto retu}
{:loe} {send ~~^[^[} {goto retu} ;this is sending two "Esc" presses
{:pas|} {send %_pas|} {goto retu} ;this sends your password
{:mprot}{comp or_prot}
{ifco ,orprot}
{comp mprot} {ifco-c mp__z}
{send ~%mprot} {goto retu} ;this sends your mail fetching protocol
{:orprot}{send ~%or_prot} {goto retu}
{:no} {send ~%no}{pops-c} {goto ndl}
{:c_x} {comp _prot,k} {ifco qdl} ;no way to quit kermit once started
{paus 4} {pops-c}
{send ~^x^x^x^x^x^x^x} {goto ndl}
{:at_bbs}{pops-c}
{setv at_bbspmt,y} {goto byz} ;Known that we are at bbs prompt
{:retry}{paus 2} {send r|} {goto db_1} ;If bad name entered
{:un_pfl} {setv pfl} {retu} ;"No mail" message during logon
; clears %pfl which you may set in .FON. This is a reverse of mail
; check logic in that it assumes there is mail, but will not uqwk if
; the "No mail" message appears during logon. See TABLE:int bypass9.
┌─────────────────────────┐
│ Generic Logon Routine │
└─────────────────────────┘
* This logon macro works for times you DON'T want to
* make a mail run. It is designed to get you quickest to the
* "Main BBS Command?" prompt.
*
* It is necessary that this routine be reached via CS-TABLE.CSM
* since several BBS prompts are set there.
{:glr}
info-d5 Logging on Now
spdc n ;Blind display "for the bold"
{spdc y}
{setv ss_z,~z} ;for PowerBBS upload protocol
{setv ss_gr,~g|} ;for DCQwk <G> to start
{setv ss_ur,~u|} ;for O_QWKer
{setv ss_bs,^h} ;timer reset while waiting for d/l
{beep}
{wind}
{setv 2,1} ;%2 is a door counter
{sete-p0 log_esc} ;point to ESCape routine (during logon)
{noca bya} ;point to lost carrier routine
{setv at_bbspmt} ;clear at-BBS flag
{setv nodl} ;clear no-download flag
{comp debug}{ifco db_1} ;using %debug variable to open
{capm raw} ; a capture file to facilitate
{setv capt,on} ; troubleshooting when necessary
{setv db_ct,0} ; counter for debug marks
{capt y,%_hom%debug.cap}
{:db_1} {pops-c}
{push} ;push + pops acts like "call"
{setl 60,ab_pa} ;allow 60 seconds to password prompt
{golo loe, twice} ;send Escape twice "Front End"
{golo loe, (ESC)} ;send Escape twice "Binkley"
{golo loe,[ESC]} ;send Escape twice "1st Amendment BBS"
{golo loe,ESCape} ;send Escape, another Binkley
{golo loe,InterMail } ;InterMail front end
{comp fe_pmt}{ifco no_fe}
{golo loe,%fe_pmt} {:no_fe};user definable "Front-end" prompt in .FON
{golo y%rs,orrect?} ;send 'y' when caller ID is asked
{golo bbs, request: } ;NLBBS Front End, part I
{golo _|,Login: } ;NLBBS Front End, part II
{golo n|,A>?} ;just say 'no' RBBS prompt
{golo |, [Y,n} ;MAXIMUS BBS "name?" confirmation
; and More [Y,n,=]? prompt
{golo onl,%bbs_pmt} ;Logged on via "quick" logon
{golo %lan_pmt} ;send language response "CS-TABLE.CSM"
{golo %gra_pmt} ;send graphics instructions "CS-TABLE.CSM"
{golo %nam_pmt} ;send name "Prompt from CS-TABLE.CSM"
{look %pwd_pmt} ;Logon macro has two "lookfors"
{paus 1} {call pas|} ; Why? To accomodate more golooks.
{:qlo_1}{pops-c} ;hits here on quick logon
{push}
{setl 60,ab_bb} ;allow 60 seconds to BBSware prompt
{golo %bypass1} ;These BBSware specific 'pause-
{golo %bypass2} ; avoiding-responses' are set in
{golo %bypass3} ; CS-TABLE.CSM
{golo %bypass4}
{golo %bypass5}
{golo %bypass6}
{golo %bypass7}
{golo %bypass8}
{golo %bypass9}
{golo n|,[y/n]?} ;just say 'no' to "Y/n"
{golo n|,=yes?} ;just say 'no' to "mail scan"
{golo c|,inue? [} ;[C]ontinue to -pause- prompt
{golo pas|,Wrong passw} ;resend password if necessary
{look %bbs_pmt} ;Generic Logon Complete
{:onl} {spdc y} {pops-c} ;All set. Logged-ON.
{comp debug,y} {ifco ,ac_pr}
{incr db_ct}
{disp ,,,## %_24h%:%_min%.%_sec% LOGGED-ON ##%db_ct##}
┌─────────────────────────┐
│ Call ACTION Processor │
└─────────────────────────┘
{:ac_pr}{ifex %_hom%action.%abbr%,,noact} ;CALL "ACTION processor"
{wind-k}
{setv _menu1,'S' to skip ACTION ■ Any other key continues}
{setv _mlabel,ac_a}
{subs _mcolor,31,5,%palette}
{keys 61}
{menu 3,50,CS-MAC%ver}
{:ac_a} {beep}
{setg 10,doact,n} ;if response is <CR>, do
{gets-hi count,1,doact} ;using Commo for timed branch
{comp count,s} {ifco noact,doact} ;15 second delay, default=do
{:doact} {wind} {goto action,cs-acton.csm} ;CS-ACTON.CSM Returns to :noact
┌─────────────────────────────────────────┐
│ "FLAG" events may be called from here │
└─────────────────────────────────────────┘
* A %flag% variable is used to call for NEWFILE scans.
* You should set the %flag variable in COMMO.FON
* Setting .... flag,n ... "n" runs :NEWFILES,
*
* This facility is setup for easy expansion.
{:noact}{wind}
{sete-p0 log_esc} ;ESCape (after trip to CS-ACTON)
{comp inet} {ifco ,do_inet} ;%inet logon, mark & telnet
{comp mail} {ifco log_esc} ;If %mail empty, quit macro here
{comp bbsid}{ifco log_esc} ;If %bbsid empty, quit
{inst flag,n} {ifco-c newfiles} ;otherwise, run %flag
┌─────────────────────────┐
│ MailRun Routine Start │
└─────────────────────────┘
* Checking for a .REP file. If a REP exists, you are offered
* the option to only upload those replies. But, the default action
* is to get a QWK. This way, unattended sessions fetch a .QWK
* Or, by presetting the variable %skip to "nl", you can skip the
* attempt to download mail from the "NLBBS".
{comp skip,%abbr} {ifco n_d} ;"skip" flags
{comp skip,y} {ifco n_d}
{ifex %repdr\%bbsid.%rep,ask,d_l} ;GOTO mailrun routines
{:ask} {wind-k}
{setv _menu1,(C)ontinue mail d/l NOW ■ 'S' to skip d/l}
{setv _mlabel,re_a}
{subs _mcolor,31,5,%palette}
{keys 61}
{menu 3,45,CS-MAC%ver}
{:re_a} {beep}
{setg 10,d_l,n}
{gets-hi count,1,d_l} ;using Commo for timed branch
{comp count,s} {ifco n_d,d_l} ;15 second delay, default=d/l
{:n_d} {wind}
{setv nodl,y} ;set flag to skip mail d/l
{ifex %repdr\%bbsid.%rep,,at_bbs} ;if no .rep, Goodbye
┌───────────────────────────────┐
│ Get to the Mail Door Prompt │
└───────────────────────────────┘
{:d_l} {wind}
{comp quit} {ifco qul} ;Any built-in mail command, quit == NUL
{comp dorno} {ifco qul} ;Any built-in mail command, dorno == NUL
{setv at_bbspmt}
{send ~%dorno} ;command to open mail door
{push}
{setl 60,ab_mw} ;allow 60 secs to get to MAILware prompt
{golo at_bbs,invalid} ;for invalid door selection
{golo at_bbs,%bbs_pmt} ;if unable to enter door
{golo ch_at,%chat_str} ;respond to sysop CHAT request
{golo %md_bypa1} ;generic "continue... " from CS-TABLE
{golo ndl,sorry,} ;for T.A.G. unable to enter door
{look %md_pmt} ;from CS-TABLE.CSM prompt table
{comp debug,y} {ifco ,qul}
{incr db_ct}
{disp ,,,## %_24h%:%_min%.%_sec% AT MAIL DOOR PROMPT ##%db_ct##}
┌─────────────────┐
│ Upload a .REP │
└─────────────────┘
* If a .REP exists, it is sent before download attempt.
{:qul} {pops}
{ifex %repdr\%bbsid.%rep,,nup}
{exec-n echo %repdr\%bbsid.%rep> %_hom%^(send^).lst}
{send ~%up}
{setl 30,ab_mu} ;allow 30 seconds to start upload
{call ul_rep} ;call upload rep subroutine
{pops-c}
{push}
{setl 120,ab_up} ;allow 120 seconds to process upload
{golo ch_at,%chat_str} ;respond to sysop CHAT request
{golo %md_bypa1} ;generic "continue... " from CS-TABLE
{look %md_pmt}
{pops}
{comp mail,uqw} {ifco-c uqw_up} ;call uqwk subroutine
{comp debug,y} {ifco ,nup}
{incr db_ct}
{disp ,,,## %_24h%:%_min%.%_sec% REP UPLOAD DONE ##%db_ct##}
┌───────────────────┐
│ Download a .QWK │
└───────────────────┘
* The ":nup" section would be skipped if you decided to skip .QWK
* downloading in the "Mailrun Routine Start, :ask" section.
{:nup} {comp nodl,y} {ifco byz} ;Skip d/l if %nodl=y
{send ~%dn} ;Otherwise, scan for messages
{push}
{setl 120,ab_md} ;allow 120 secs to prep download
; as far as message counting
{golo ndl,%mt_qwk} ;eMpTy .QWK message "from CS-TABLE.CSM"
{golo %md_brnch} ;Branch, refer to MAILware CS-TABLE.CSM
{golo %md_bypa1} ;Call, refer to MAILware CS-TABLE.CSM
{golo ch_at,%chat_str} ;respond to sysop CHAT request
{golo retu,^m} ;reset timer if door is active
{look Message Count}
{goto qdl} ;not likely to hit this line
{:p_flg}{setv pmail,Mail @ %_24h%:%_min on %_dat} ;Set Autopilot message
{setv pfl,y} ;Cleared at :qdl routine
{retu} ;Cleared on Alt-C or on Alt-A "No" response
┌────────────────────────────────────────────────┐
│ Count Messages or Extended maildoor prompts │
└────────────────────────────────────────────────┘
* It is possible to add routines specific to any MAILware.
* Use the variable %md_branch defined in CS-TABLE.CSM to choose the
* appropriate maildoor interaction and message counting routine.
*
* This section will skip the RENQWK and any attempt to download if
* the maildoor scans less than %min_msg messages for your .QWK packet.
{:c_blu}
{setg ,,l,^m} ;Bluewave message counting
{gets count,12} ;get total message count
{subs count,-4,4,%count} ;take last 4 characters total
{look ALL NEW mail.} ;Bluewave bundling command
{send ~|} ;bundle any packet to get to ...
{look %xfer_pmt} ; mail transfer prompt
{comp count,%min_msg} ;if less than %min_msg total messages,
{ifco-l no,qdl} ; then skip download
{:c_cam}
{setg ,,l,^m} ;Cam-Mail message counting
{gets person,15} ;get total message count w/ANSI
{subs person,-4,4,%person} ;take last 4 characters total
{look .......} ;Cam-Mail personal message count
{gets count,15} ;get personal message count w/ANSI
{subs count,-4,4,%count} ;take last 4 characters personal
{golo ndl,%mt_qwk} ;eMpTy .QWK message "from CS-TABLE.CSM"
{look %xfer_pmt}
{comp person,1} ;check for personal messages
{ifco-gec p_flg} ;set autopilot message
{ifco-ge qdl} ; if any, do download ... but ...
{comp count,%min_msg} ;if less than %min_msg total messages,
{ifco-l no,qdl} ; then skip download
{:c_coq}
{setg ,,l,^m} ;Message counting
{gets count,74} ;for Charlie's Offline Reader
{subs count,-3,3,%count} ;take last 3 characters total
{golo ndl,%mt_qwk}
{look %xfer_pmt}
{comp count,25}
{ifco-l no,qdl}
{:c_exq}
{call y}
{sslo ss_bs,.}
{look %xfer_pmt} ;prompted by "autodownload"
{goto qdl}
{:c_lak}
{call n} [N T Q]? ;LAKOTA Download menu (new messages)
{push}
{golo y,[A S Y Q]?} ;LAKOTA Conference menu (Your queue)
{golo mprot,[X Y Z Q]?} ;LAKOTA Protocol menu (sends %mprot)
{look %xfer_pmt}
{pops}
{goto qdl}
{:c_mm2}
{setg ,,l,^m} ;MarkMail2 message counting
{gets count,16}
{subs count,-4,4,%count}
{look sages: }
{gets person,16}
{subs person,-4,4,%person}
{golo ndl,%mt_qwk}
{look %xfer_pmt}
{comp person,1}
{ifco-gec p_flg}
{ifco-ge qdl}
{comp count,%min_msg}
{ifco-l no,qdl}
{:c_mmj}
{setg ,,l,^m} ;MajorBBS QWK mail message counting
{gets count,5}
{look %xfer_pmt}
{inst count,[}
{setv pos,%_pos}{decr pos}
{subs count,1,%pos,%count}
{comp count,%min_msg}
{ifco-l no,qdl}
{:c_mmp}
{call q} [a]scii: ;MacroBBS packer choose .qwk
{look Total: }
{setg ,,l,^m} ;MacroBBS QWK mail message counting
{gets count,9} ; doesn't really count, just resets
{push} ; the setl timer with a fresh look.
{golo y,download: }
{golo retu,^m} ;reset timer if door is active
{look %xfer_pmt}
{goto qdl}
{:c_p15}
{setg ,,l,^m} ;PCBoard 15.x QWK message counting
{gets count,5}
{look %xfer_pmt}
{comp pfl} {ifco ,qdl}
{comp count,%min_msg}
{ifco-l c_x,qdl}
{:c_pwq} (Total Messages: 28) (Total Messages: 28
)
{call a|} ;PowerBBS [A]ll Chosen Forums
{look Messages:}
{setg ,,l,^m} ;PowerBBS QWK message counting
{gets count,25}
{look %xfer_pmt}
{inst count,} {ifco pwq_esc} ;count from ESC -or-
{inst count,)} ;count from close paren
{:pwq_esc}
{setv pos,%_pos}{decr pos}
{subs count,1,%pos,%count}
{comp count,%min_msg}
{ifco-l no,qdl}
{:c_qm2}
{setg ,,l,^m} ;Qmail2 message counting
{gets count,18}
{subs count,-4,4,%count}
{look gs Found....}
{gets person,18}
{subs person,-4,4,%person}
{golo ndl,%mt_qwk}
{look %xfer_pmt}
{comp person,1}
{ifco-gec p_flg}
{ifco-ge qdl}
{comp count,%min_msg}
{ifco-l no,qdl}
{:c_qm4}
{setg ,,l,^m} ;Qmail4 message counting
{gets count,18}
{subs count,-4,4,%count}
{look Found.....}
{gets person,18}
{subs person,-4,4,%person}
{golo ndl,%mt_qwk}
{look %xfer_pmt}
{comp person,1}
{ifco-gec p_flg}
{ifco-ge qdl}
{comp count,%min_msg}
{ifco-l no,qdl}
{:c_roz}
{setg ,,l,^m} ;Rosemail message counting
{gets count,4}
{subs count,-4,4,%count}
{look you :}
{gets person,4}
{subs person,-4,4,%person}
{golo ndl,%mt_qwk}
{look %xfer_pmt}
{comp person,1}
{ifco-gec p_flg}
{ifco-ge qdl}
{comp count,%min_msg}
{ifco-l no,qdl}
{:c_slx}
{setg ,,l,^m} ;Silver Express message counting
{gets count,4} ;get total message count
{look %xfer_pmt} ; mail transfer prompt
{comp count,%min_msg} ;if less than %min_msg total messages,
{ifco-l no,qdl} ; then skip download
{:c_tma}
Total messages:
###
Your Messages :
##
{setg ,,l,^m} ;TriMail message counting
{gets count,18}
{look Messages : }
{gets person,18}
{golo ndl,%mt_qwk}
{look %xfer_pmt}
{inst count,m} {setv pos,%_pos} {incr pos}
{subs count,%pos,3,%count}
{inst person,m} {setv pos,%_pos} {incr pos}
{subs person,%pos,3,%person}
{comp person,1}
{ifco-gec p_flg}
{ifco-ge qdl}
{comp count,%min_msg}
{ifco-l no,qdl}
{:c_tc!}
messages found:
###
(
##
personal)
{setg ,,l,^m} ;TomCat! message counting
{gets count,40}
{golo ndl,%mt_qwk}
{look %xfer_pmt}
{inst count,(}
{ifco-c p_flg} {ifco qdl} ;personal message, download
{inst count,m} {setv pos,%_pos} {incr pos}
{subs count,%pos,5,%count}
{inst count,} {ifco ,c_tc!1}
{setv pos,%_pos}{decr pos}
{subs count,1,%pos,%count}
{:c_tc!1}
{comp count,%min_msg}
{ifco-l no,qdl}
{:uqw_up}
{send unzip -U %bbsid.%rep|}
{look %bbs_pmt}
{send uqwk -m -n %uqwk_up -R%uqwk_r%|}
{look %bbs_pmt}
{push}
{send rm %bbsid.%rep|}
{golo y|,rm: remove}
{look %bbs_pmt}
{pops}
{retu}
{:c_uqw}
{look %bbs_pmt} ;uqwk download submacro
{send zip -k -m %bbsid.%qwk *.DAT *.NDX *.MSG AREAS *.JN *.NWS *.IDX *.MAI|}
{look %bbs_pmt} ─────┬───── ──────┬──── ───────────┬──────────
{goto qdl} QWK ─┘ SOUP ─┘ ZIPNews ─┘
{:c_wci}
{setg ,,l,^m} ;Wildcat! internal mail counting
{gets count,18}
{inst count,m} {setv pos,%_pos} {incr pos}
{subs count,%pos,3,%count}
{look %xfer_pmt}
{comp count,%min_msg}
{ifco-l no,qdl}
{:c_wcm}
messages found:
###
(
##
personal)
{setg ,,l,^m} ;wcMAIL message counting
{gets count,40}
{golo ndl,%mt_qwk}
{look %xfer_pmt}
{inst count,(}
{ifco-c p_flg} {ifco qdl} ;personal message, download
{inst count,m} {setv pos,%_pos} {incr pos}
{subs count,%pos,5,%count}
{inst count,} {ifco ,c_wcm1}
{setv pos,%_pos}{decr pos}
{subs count,1,%pos,%count}
{:c_wcm1}
{comp count,%min_msg}
{ifco-l no,qdl}
{:c_zns}
{setg ,,l,^m} ;Message counting for
{gets count,9} ;Jack Kilday's ZIPNews door
{subs count,-3,3,%count}
{golo ndl,%mt_qwk} ;ZIPNews "empty" occurs after count
{look %xfer_pmt}
{comp pfl} ;%pfl set during mail/news scan
{ifco ,qdl} ;Take a packet with personal mail
{comp count,%zmin_msg}
{ifco-l no,qdl}
┌─────────────────────────────────┐
│ Call .QWK rename and Download │
└─────────────────────────────────┘
{:qdl} {pops-c} ;Yes, do download a packet
{setv pfl} ;ZIPnews personal mail flag
{ifex-c %qwkdr\%bbsid.%qwk,renqwk};call renqwk routine
{ifex-c %znpak\%bbsid.%qwk,renqwk};likewise for second directory
{send ~%yes}
{call dl_qwk} ;call download the .qwk routine
{:ndl} {pops-c} ;No, don't download a packet
{push}
{setl 60,ab_mp} ;allow 60 secs to return to MAILware prompt
{golo ch_at,%chat_str} ;respond to sysop CHAT request
{golo at_bbs,%bbs_pmt} ;any maildoor returning to BBS
{golo n|, Try again? (Y/N)};ZIPNEWS failed download
{golo n|,messages as READ?};Bluewave aborted download
{golo a|,Enter or Select: };O_QWKer aborted download
{golo %md_bypa1} ;generic "continue... " from CS-TABLE
{look %md_pmt} ;from MailDoor prompt table
{setv mail} ;clear this variable
┌─────────────────────────────────────────────────────────────────────────┐
│ Loop to CS-TABLE.CSM and CS-LOGON:noact for multiple doors in one call │
└─────────────────────────────────────────────────────────────────────────┘
* The variable %bbs is set to NUL on the first pass through CS-TABLE.CSM.
* When CS-TABLE.CSM,%mail is called with a NUL %bbs variable, CS-TABLE.CSM
* will return control to CS-LOGON:noact
* To enter a second door on one call, set a variable, %door2, in
* COMMO.FON. You will set %mail, %dorno, and %bbsid in %door2.
* ────┬───── ────┬ ───┬── ┬─────
* └─────> Example; (door2,znr,zipnews|,nlbbs)
* (door3,qm4,qwkmail|,nlbbs)
{:byz} {comp inet} {ifco ,do_inet}
{pops-c}
{incr 2}
{comp door%2} ;is there a %door# variable?
{ifco byz2} ;if not, bye now
{setv-s parse,door%2} ;transfer %door# to %parse
{setv door%2} ;clear %door# variable
{setv nodl} ;allow packet from second door
{comp at_bbspmt} ;not at bbs prompt already?
{ifco-c quit} ;ifnot, call :quit routine
{inst parse,,} ;find first "," in %door#
{setv pos,%_pos} {decr pos}
{subs mail,1,%pos,%parse} ;portion before "," is %mail (MAILWare)
{incr pos,2}
{subs parse,%pos,80,%parse};portion after "," is %dorno and %bbsid
{inst parse,,} ;find second "," in %door#
{setv pos,%_pos} {decr pos}
{subs dorno,1,%pos,%parse} ;portion before "," is %dorno entry command
{incr pos,2}
{subs bbsid,%pos,9,%parse} ;portion after "," is %bbsid
{setv parse}
{comp debug,y} {ifco ,qwk} ;Will return to CS-LOGON.CSM:noact
{incr db_ct}
{disp ,,,## %_24h%:%_min%.%_sec% GETTING DOOR%2 INFO ##%db_ct##}
{goto qwk,cs-table.csm} ;Will return to CS-LOGON.CSM:noact
┌──────────────────────────────────────────┐
│ "Quit" routine to get back to %bbs_pmt │
└──────────────────────────────────────────┘
{:quit} {comp dorno} {ifco retu} ;Built-in maildoor IS at the prompt
{send ~%quit} ;this quits maildoor
{push}
{setl 30,ab_re} ;allow 30 seconds to return to BBS
{golo ch_at,%chat_str} ;respond to sysop CHAT request
{golo |,Scan Command?} ;Empty <CR> if PCBoard Quick scan
{golo %md_bypa1} ;Genric mailware contine prompt
{look %bbs_pmt} ;return to main BBS prompt
{pops}
{goto retu} ;provides debugging assistance
┌──────────────────────┐
│ LogOFF or Stay on? │
└──────────────────────┘
* Again a choice. Default is to end the connection, but you may
* stay ONLINE if you wish. The macro is setup to open a capture
* file if you choose to stay online.
{:byz2} {comp at_bbspmt,y} ;at bbs prompt already?
{ifco by_me} ;ifso, jump to onscreen bye warning
{comp md_bye} ;Does this MAILware have a bye command?
{ifco-c quit} ;ifnot, call :quit MAILWare routine
{:by_me}{wind-k}
{setv _menu1,'G' for Goodbye ■ SPACEbar to capture}
{setv _menu2, Any other key ■ Stay, no capture }
{setv _mlabel,gb_a}
{subs _mcolor,31,5,%palette}
{keys 61}
{menu 6,41,CS-MAC%ver}
{:gb_a} {alar 1}
{setg 10,bye,n} ;:bye on timeout
{gets-hi count,1,log_esc} ;Empty <CR> acts like [ESC]
{comp count,g} {ifco bye} ;This timed branch allows
{comp count, } {ifco sta} ; any key to respond
{goto log_esc} ;ESC = STAY ONLINE, no capture
{:sta} {wind} ;"Stay" routine with capture
{setv debug} {setv db_ct} ;clear debug assistance
{capt n} ;turnoff debug capture if on
{setv capt} ;clear flag to avoid closing .CAP
{capm filter} ;reset capture mode to filter
{setv abbr}
{call capture_} ;cs-commo.csm:capture_ opens capture file
{comp keyb}{ifco ,keyb} {} ;load %keyb file per .FON
{:bbs_bye}{send %bye%%rs} {retu} ;bye from BBS
{:md_bye} {send %md_bye} {retu} ;bye from Maildoor
{:bye} {wind}
{comp md_bye} ;does mail door have bye command?
{ifco-c bbs_bye,md_bye} ;call appropriate "bye" response
{push}
{setl 15,ab_hu}
{golo loe,<esc>} ;stifle host delays
{golo y|, log off }
{golo n|, comment }
{golo y|,Are you sure} ;MajorBBS, Bluewave
{golo y|,Off?} ;Virtual BBS
{golo g|,[G] Goodbye...} ;Babble
{golo |,?=help]?} ;MacroBBS & MAXIMUS
{golo n,your choice -->} ;EXEC-PC
{golo |,continue} ;Babble, PCBoard extened exit
{golo |,ENTER} ;Silver Express, PowerBBS logoff
{golo |, [y,n,?=help]?} ;BlinkLink
{golo ch_at,%chat_str} ;respond to sysop CHAT request
{look %inet_pmt} ;returned to internet provider
;can be bogus string, never hit
{ifca bye_inet} ;goto :bye_inet if online
{:bya} {pops-c} ;hit here from (noca,bya)
{comp debug,y} {ifco ,no_dbhu}
{incr db_ct}
{disp ,,,## %_24h%:%_min%.%_sec% HANGING UP ##%db_ct##}
{setv debug} {setv db_ct} ;clear debug assistance
{capt n} ;turnoff debug capture if on
{setv capt} ;clear flag to avoid closing .CAP
{capm filter} ;reset capture mode to filter
{:no_dbhu}
{ifca-c hang} ;hangup if carrier isn't gone
{setv alias}
{setv abbr} ;recycle variables
{call strew_} ;distribute .QWK/.ZIP/.GIF/.ZNS
{comp m_call} {ifco fon_dial};goto dialer if m_call is nul
{goto %m_call} ;Dial next marked BBS
{:log_esc}
{pops-c} ;if exit by pressing ESCape
{setv debug} {setv db_ct} ;clear debug assistance
{capt n} ;turnoff debug capture if on
{setv capt} ;clear flag to avoid closing .CAP
{capm filter} ;reset capture mode to filter
{setv abbr} ;same as 'Space to stay' except
{comp keyb} {ifco ,keyb} ;load %keyb file per .FON
{retu} ; does not open capture file
{:hang} {hang y} {retu} ;hangup if carrier is there
* Support to load different keyboard definition files
* via %keyb variable. Examples are PINE, VT102, and VT220
{:keyb} {goto ,%keyb.mac} {} ;load alternate keyboard macro
┌─────────────────────────────────┐
│ Abnormal session terminations │
└─────────────────────────────────┘ setl timer
{:ab_rm}{setv msg,Ç CONNECT, Re-mark} {mark %bbsid} {goto ab_co} 60 seconds
{:ab_pa}{setv msg,CONNECT to password prompt} {goto ablog} 60
{:ab_bb}{setv msg,Password to BBSware prompt} {goto ablog} 60
{:ab_mw}{setv msg,BBSware to MAILware prompt} {goto ablog} 60
{:ab_mu}{setv msg,Didn't get to ^xB01 upload start} {goto ablog} 30
{:ab_up}{setv msg,Upload to MAILware prompt} {goto ablog} 120
{:ab_md}{setv msg,Download command to xfer prompt} {goto ablog} 120
{:ab_mp}{setv msg,Mail download to MAILware prompt} {goto ablog} 60
{:ab_re}{setv msg,Quit MAILware to BBSware prompt} {goto ablog} 30
{:ab_hu}{setv msg,Goodbye to carrier lost} 15
{:ab_co}{exec-n echo ^(AB^) %_ela %msg >> %_uselog}
{setv msg} {goto bya}
{:ablog}{exec-n echo ^(AB^) %_ela %msg >> %_uselog}
{setv msg} {goto by_me}
┌──────────────────────────────────────────┐
│ .QWK file rename via .bat or via macro │
└──────────────────────────────────────────┘
* There are many ways to rename mail packets.
* RENQWK.BAT present in Commo home directory ... use renqwk.bat
* Passing these variables from CS-LOGON.CSM to renqwk.bat
* %1 = %qwkdr : %2 = %bbsid : %3 = %abbr %4 = %qwk
*
*┌--------------- renqwk.bat -┐ <-- cut here --
*| @echo off |
*| ctty nul |
*| |
*| del %1\%3__5.%4 |
*| ren %1\%3__4.%4 %3__5.%4 |
*| ren %1\%3__3.%4 %3__4.%4 |
*| ren %1\%3__2.%4 %3__3.%4 |
*| ren %1\%3__1.%4 %3__2.%4 |
*| ren %1\%2.%4 %3__1.%4 |
*| |
*| ctty con |
*└------------------------------┘ <-- cut here --
*
* RENQWK.BAT absent from Commo home directory ... use :renqwk macro
*
* The variable %rdr is used to branch to the macro based rename
* method you prefer. The default method uses the date as part of
* the name and allows up to 10 .qwk packets of the same date
* (NL-1108.QWK --> NL-1108.QW0 --> NL-1108.QW1 --> etc.)
*
* It would be very easy to change this progression to keep
* the file extension ".qwk"
* (NL-1108.QWK --> NL-11080.QWK --> NL-11081.QWK --> etc.)
*
* Other supported methods are JABBER (setv rdr,jbr)
* ZIPNews (setv rdr,znr)
{:renqwk}
{ifex %_hom%renqwk.bat,ren_bat} ;use .BAT if it exists
{comp rdr} {ifco ren_qwk} ;choose macro rename method
{goto ren_%rdr} ;%rdr == jbr -or- zns
┌────────────────────────────────┐
│ Rename method via RENQWK.BAT │
└────────────────────────────────┘
{:ren_bat}
{exec-n %_hom%renqwk %qwkdr %bbsid %abbr %qwk} ;.QWKfile rename
{retu} ; via renqwk.bat
┌──────────────────────────────────────────────────────────┐
│ Rename method via default macro method described above │
└──────────────────────────────────────────────────────────┘
{:ren_qwk}
{ifex %qwkdr\%abbr%-%_mon%%_day.%qwk,m_dat}
{exec-n ren %qwkdr\%bbsid.%qwk %abbr%-%_mon%%_day.%qwk>NUL}
{retu}
{:m_dat}{setv count,0}
{:m_lop}{ifex %qwkdr\%abbr%-%_mon%%_day.qw%count,,r_mul}
{incr count}
{goto m_lop}
{:r_mul}{exec-n ren %qwkdr\%bbsid.%qwk %abbr%-%_mon%%_day.qw%count>NUL}
{retu}
┌───────────────────────────────────────┐
│ Rename method ala Jabber or ZIPnews │
└───────────────────────────────────────┘
* Both Jabber and ZIPnews rename routines here share the same core.
* Jabber renames mail packets with a three digit extension,
* ZIPnews renames with .Z?? between .Z00 and .Z99 for ZIPNews packets
* ZIPnews renames with .S?? between .S00 and .S99 for SOUP packets
* The rename method is perpetual, taking a string of %max_pak packets
* from 000 to 999 and through the 000 threshold (or from 00 to 99
* in the case of ZIPnews).
* %max_pak must be less than 49 for ZIPnews, less than 499 for Jabber.
{:ren_znr}
{setv core,%znpak\%bbsid.%qwk} ;packet to be renamed
{subs ext,1,1,%qwk} ;S for SOUP, Z for ZIPNews
{setv dir_mask,%znpak\%bbsid.%ext};directory search mask (. required)
{setv ren_pak,%bbsid.%ext} ;packet rename protocol (. required)
{setv del_v,100} ;00-99 = 100 items to loop through
{setv len,2} ;2 digits in "00" and "99"
{call ren_ext}
{retu}
{:ren_jbr}
{setv core,%qwkdr\%bbsid.%qwk} ;packet to be renamed
{setv dir_mask,%qwkdr\%bbsid.} ;directory search mask (. required)
{setv ren_pak,%bbsid.} ;packet rename protocol (. required)
{setv del_v,1000} ;000-999 = 1000 items to loop through
{setv len,3} ;3 digits in "000" and "999"
{call ren_ext}
{retu}
{:def_e}{subs ext,1,%len,000}{retu} ;subroutine - first qwk->000
{:1st_e}{setv ext,%count} {retu} ;subroutine - get first value
{:max_pak}{setv max_pak,10} {retu} ;subroutine - default %max_pak
{:0_pad}{retu}
{:1_pad}{setv ext,0%ext} {retu} ;subroutine - pad with zeros
{:2_pad}{setv ext,00%ext} {retu} ;subroutine - pad with zeros
{:sho_ren} {comp sho_,n} {ifco retu} ;subroutine - show file activity
{info-d4s0 REN %core -> %ext ■ DEL %del} {retu}
{:ren_ext}
{comp max_pak} {ifco-c max_pak};default %max_pak = 10
{decr del_v,%max_pak} ;determines how far back to delete
{setv ext} ;start with clean slate
{setv digits,1234567890} ;only digits are valid extensions
{file %dir_mask%*} ;initialize packet dir search
{:dir_loop} ;guts of sorting to get next ext
{subs test,-%len,1,%_ffn} ;first char in test ext
{inst digits,%test} {ifco ,rear} ; -MUST- be a digit
{subs count,-%len,%len,%_ffn} ;get value to test
{comp ext} {ifco-c 1st_e} ;initialize new value
{comp count,%ext} {ifco-g sub_ext} ;diff between two values
{setv temp,%ext}{decr temp,%count} ;test value is smaller
{comp temp,%max_pak}{ifco-g front,rear} ; if by too much, front
{:sub_ext}
{setv temp,%count}{decr temp,%ext} ;test value is larger
{comp temp,%max_pak}{ifco-g rear,front} ; if by too much, skipit
{:front}{setv ext,%count} ;last test becomes new ext
{:rear} {file-x %dir_mask%*} ;get next filename to test
{ifco dir_loop} ;loop if we have a filename
{comp ext} {ifco-c def_e} ;assign 000's if no valid ext found
{incr ext} ;increment largest ext found
{subs ext,-%len,%len,%ext} ;always shorten ext to max length
{setv del,%ext} ;delete starts as new name ...
{incr del,%del_v} ;incremented by "88" or "988" or so
{subs del,-%len,%len,%del} ;and truncated to correct # of digits
{leng %ext} ;how many digits in the new extension?
{decr len,%_len} ;if too short, pad w/000's
{call %len%_pad}
{call sho_ren} ;show the screen what's happening
{exec-n ren %core% %ren_pak%%ext>NUL}
{exec-n del %dir_mask%%del>NUL};finally, rename and delete
{setv ren_pak}{setv dir_mask} ;clear variable space
{setv digits}{setv del_v}
{setv core}{setv ext}{setv del}
{setv test}
{retu}
┌───────────────────────────────────────────────┐
│ .QWK and .REP transfer protocol subroutines │
└───────────────────────────────────────────────┘
* This arrangement provides a method to use a variety of mail
* transfer protocols. It relies on the protocols in CS-COMMO.CSM
{:mp__z} {setv mprot,z} {retu} ;default to Zmodem
{:m_prot} {setv _prot,%mprot} {retu} ;use %mprot
{:or_prot}{setv _prot,%or_prot}{retu} ;use override protocol
{:ul_rep}
{comp mprot} {ifco-c mp__z}
{comp or_prot}
{ifco-c m_prot,or_prot}
{setv ss_%_prot,~%_prot}
{setl 15,um_#}
{sslo ss_ur,or Select: } ;O_QWKer
{sslo ss_%_prot,which protocol};PowerBBS protocol confirm
{sslo ss_%_prot,Protocol? } ;TriMail :tma
{golo retu,Insufficient} ;won't see ^xB01, return
{golo ure_s,^xSMODEM} ;CS-COMMO will issue the return
{golo ure_k,^a# N3}
{golo ure_z,^xB01}
{look Mail Upload Protocol} {} ;protocols are in CS-COMMO
{:ure_s}{setv _prot,S} {goto um_#}
{:ure_k}{setv _prot,K} {goto um_#}
{:ure_z}{setv _prot,Z} {goto um_#}
{:l_qwkdr} {setv dl_dir,%qwkdr} ;default dir for QWK packets
{comp %qwk,znr} {ifco-c l_znpak}
{comp %qwk,sou} {ifco-c l_znpak}
{retu}
{:l_znpak} {setv dl_dir,%znpak} {retu};default dir for SOU, ZNS packets
{:l_hldr} {setv dl_dir,%hold_dr}{retu};unless a hold dir is named
{:dl_qwk}
{comp mprot} {ifco-c mp__z} ;default protocol is Z
{comp or_prot} ;use %mprot or %or_prot
{ifco-c m_prot,or_prot}
{setv ss_%_prot,~%_prot}
{comp hold_dr}
{ifco-c l_qwkdr,l_hldr} ;determine download directory
{setl 15,d_mail} ;15 seconds of inactivity starts d/l
{sslo ss_bs,^m} ;reset timer on activity
{sslo ss_gr,<G> to start} ;DCQwk :dcq
{sslo ss_r,or wait 10} ; :coq
{sslo ss_r, <enter> } ; :mxr
{sslo ss_%_prot,Protocol? } ;TriMail :tma
{golo byz,%md_pmt} ;maildoor packing error
{golo dqw_s,^xSMODEM} ;jump to Smodem routine
{golo dqw_k,^a5 S~} ;jump to Kermit routine
{golo dqw_z,^xB00} ;jump to Zmodem routine
{look Mail Download Protocol}{};protocols are in CS-COMMO
{:dqw_s}{setv _prot,S} {goto d_mail}
{:dqw_k}{setv _prot,K} {goto d_mail}
{:dqw_z}{setv _prot,Z} {goto d_mail}
┌───────────────────────────────────┐
│ File distribution from Hold dir │
└───────────────────────────────────┘
* This subroutine is called at the end of each call.
* If %hold_dr is named;
* .ZNS, and .SOU files are moved into %znpak
* .QWK, .OLX, and %_dwt? files are moved into %qwkdr
* .GIF, .RLE, .BMP, .TIF, and .PCX files are moved into %picdr
* .ZIP, .LZH, .ARC, .EXE, .DWC, and .ZOO files into %dldir,
* Other files remain in %hold_dr.
{:sho_mov} {comp sho_,n} {ifco retu} ;subroutine - show file activity
{info-d2s0 Moving %hold_dr\%move_f to %m_dir } {retu}
{:strew_} ;start hold_dr distribution
{comp %hold_dr} {ifco retu} ;if %hold_dr is NUL, skip distribution
{subs dw,1,2,%_dwt} ;first two char of day-of-week
{setv zn_exts,.zns.sou} ;set exts move to %znpak
{setv qw_exts,.qwk.olx.%dw?} {setv dw} ;set exts move to %qwkdr
{setv pi_exts,.gif.rle.bmp.tif.pcx} ;set exts move to %picdr
{setv dl_exts,.zip.lzh.arc.exe.dwc.zoo};set exts move to %dldir
{comp hold_dr,%znpak} ;does hold dir == ZIPnews packet dir
{ifco-c ,mov_zns} ;ifso, don't move ZNSs
{comp hold_dr,%qwkdr} ;does hold dir == qwk file directory
{ifco-c ,mov_qwk} ;ifso, don't move QWKs
{comp hold_dr,%picdr} ;does hold dir == Picture directory?
{ifco-c ,mov_gif} ;ifso, don't move GIFs
{comp hold_dr,%dldir} ;does hold dir == download dir
{ifco-c ,mov_dl} ;ifso, don't move ZIPs
{setv move_f} ;clear last filename transferred
{setv m_dir} ;clear move-to directory
{setv f_match} ;clear match extension list
{setv cn} {setv coun,0} ;clear counters
{setv zn_exts} {setv qw_exts} ;clear strew extension definitions
{setv pi_exts} {setv dl_exts}
{retu} ;end hold_dr distribution
{:mov_dl} {ifex %dldir\NUL,,retu} ;no move unless dir exists
{setv f_match,%dl_exts} ;look for these extensions
{setv m_dir,%dldir} ;move to this directory
{goto list_mov}
{:mov_gif}{ifex %picdr\NUL,,retu}
{setv f_match,%pi_exts} ;each separate move-to directory
{setv m_dir,%picdr} ;needs extensions and where-to info
{goto list_mov}
{:mov_qwk}{ifex %qwkdr\NUL,,retu}
{setv f_match,%qw_exts}
{setv m_dir,%qwkdr}
{goto list_mov}
{:mov_zns}{ifex %znpak\NUL,,retu}
{setv f_match,%zn_exts}
{setv m_dir,%znpak}
{goto list_mov}
{:list_mov}
{setv coun,1} {setv cn,1} ;list and move counters
{file %hold_dr\*.*} ;get first filename in hold dir
{:td_ext}
{subs ext,-4,3,%_ffn} ;extract file extension - with dot
{inst f_match,%ext} ;check .EXT for match
{ifco-c add_mofn} ;add to move list, incr %count
{file-x %hold_dr\*.*} ;get next filename
{ifco td_ext} ;read to end of directory
{comp coun,1} ;if no match return
{ifco retu,mov_loop} ;otherwise, goto mov_loop
{:add_mofn} ;add_move_filename to
{setv move_f%coun,%_ffn} ;Commo variable space
{incr coun} {retu}
{:mov_loop}
{comp cn,%coun} {ifco-e retu} ;when done moving, return
{setv-s move_f,move_f%cn} ;expand move_f%cn variable
{setv move_f%cn} ; clear %move_f1 for example
{incr cn}
{:chkdup}{ifex %m_dir\%move_f,,ok_move} ;if file exists ...
{subs qwk,-3,3,%move_f} ;check extension
{comp qwk,qwk} {ifco strenq} ;if .QWK, rename it
{comp qwk,sou} {ifco strens} ;if .SOU, rename it
{comp qwk,zns} {ifco strenz} ;if .ZNS, rename it
{info-d5s0 Not moving %hold_dr\%move_f, that filename is already in %m_dir }
{goto mov_loop} ;try next filename
{:ok_move}
{call sho_mov}
{exec-n copy %hold_dr\%move_f %m_dir>NUL} ;DOS copy and delete
{exec-n del %hold_dr\%move_f>NUL}
{goto mov_loop}
{:strenq} {setv rdr,%qrdr} {call gbbsid} {call renqwk} {goto chkdup}
{:strens} {setv rdr,%znr} {call gbbsid} {call renqwk} {goto chkdup}
{:strenz} {setv rdr,%znr} {call gbbsid} {call renqwk} {goto chkdup}
{:gbbsid} {inst move_f,.} {setv len,%_pos} {decr len}
{subs bbsid,1,%len,%move_f}
{subs abbr,1,2,%bbsid} {retu}
┌────────────────────────────────────────┐
│ Functions called from %flag variable │
└────────────────────────────────────────┘
{:newfiles}
{setv strip,n}
{call stripflag}
{send n s u|}
{clea}
{exec-n echo OPENED ■ %_dat %_tim^j>> %savedir\newfiles.%abbr}
{capt y,%savedir\newfiles.%abbr}
{push}
{golo |,more?}
{look %bbs_pmt}
{pops}
{clea}
{capt n}
{exec-n echo CLOSED ■ %_dat %_tim^j>> %savedir\newfiles.%abbr}
{retu}
┌──────────────────────────────────────────┐
│ Strip the acted-on function from %flag │
└──────────────────────────────────────────┘
* This subroutine strips the variable %flag of one character
* so that each %flag function is run only once.
{:stripflag}
{inst %flag,%strip}
{comp _pos,1} {ifco fl2}
{setv pos,%_pos} {decr pos}
{subs flag1,1,%pos,%flag}
{:fl2} {setv pos,%_pos} {incr pos}
{subs flag2,%pos,36,%flag}
{setv flag,%flag1%%flag2}
{setv pos}
{setv strip}
{setv flag1}
{setv flag2}
{retu}
┌─────────────────────────┐
│ Respond to Sysop Chat │
└─────────────────────────┘
* Responds when sysop breaks into your mailrun. Asks him/her
* to return you to the command line. Turns on a capture file
* %savedir\chat.cap and sets %ap_capt for possible Autopilot use.
{:ch_at}{capt y,%savedir\chat.cap}
{paus 5}
{send Excuse me.|| ~~~May I type first?||}
{setl 10,ch_00}
{golo ch_00,ok}
{golo ch_00,sure}
{golo ch_00,yes}
{look ^m^j^m^j}
{:ch_00}{paus 3}
{send Thanks. ~~I'm nothing but a ^(Commo^) macro but ~~I had the}
{send good sense to be prepared for your inevitable interruption ~~<G>. }
{send ~~So, you have my attention, and your comments are being saved to}
{send ~~a capture file. When you are done, I will be looking for a fresh}
{send command line. ~~If I appear stalled, please hang up on me. }
{send ~~Too bad you didn't catch me at home. CYA!|||}
{setl}
{look %bbs_pmt}
{clea}
{capt n}
{setv ap_chat,CHAT}
{retu}
┌──────────────────────────────────────────┐
│ Mark and telnet from Internet provider │
└──────────────────────────────────────────┘
* Telnet uses a special dial prefix, %tn_pf, set in CS-MACxx.CFG
* I use the string "Trying" as the success response. It is set
* in do_inet if not already there.
* Use i_qwk as the marked macro name in your telnet directory
* :do_inet is called from BBSprompt if %inet is a non-NUL value
* Mark, telnet, and run the :qwk mailrun routine
{:trying}{setv _dialsr,%_dialsr,Trying}
{:do_inet}
{comp pfl,y} {ifco d_l};get mail from internet provider before
; telnetting to target BBS
{setv mail}
{inst %_dialsr,Trying} {ifco-c ,trying}
{mark >%inet} ;mark BBS name in commo.fon file
{dial 1,no_inet} ;dial and goto the :i_qwk linked macro
{}
{:no_inet} {unma-l} {goto %m_call}
* Get past the terminal server and into the BBS
* Hangup if "telnet>" or internet provider prompt reappears
* this occurs if connection times out
{:i_qwk}{setv inet}
{setv port,No available ports}
{setv msg,Normal logoff}
{setl}
{push}
{golo ctl-],No available ports} ;unable to logon
{golo q|,telnet>} ;quit telnet session
{golo ab_byein,%inet_pmt} ;hang-up
{golo bbs,login: } ;normal logon responses
{golo |,Password:}
{look Session established} {pops} ;past the server
{gets port} ;nlbbs port tracker
{call port}
{setv cc_c,0} ;Ctl-C counter
{push}
{setl 20,ctl-c} ;jump start BBS with telnet
{golo sn_ip,telnet>} ; "interrupt process"
{golo ab_cclo, closed by foreign host.}
{golo bye_inet,%inet_pmt} ;hangup if host connection lost
{golo _|, Login:} ;NLFE front end
{look CONNECT } {pops} ;on the BBS
{setv cc_c}
{goto qwk} ;pass control to regular mail
{:sn_ip}{send send ip|} {retu}
{:ctl-]}{send ^]} {retu}
{:ctl-c}{comp cc_c,1} {ifco-g ab_ccc} ;try Ctl-C twice
{send ^C} {incr cc_c}
{setv port,%port Req'd Ctl-C}{call port}{retu}
{:port} {comp chuck} {ifco retu}
{exec-n echo %_dat %_24h%:%_min%:%_sec %port >> %savedir\nlbbs.por}
{setv port} {retu}
* Hang up from internet provider
{:ab_ccc} {setv msg, Server connection established. No BBS Logon.}
{send ^]} {look telnet>}
{send close|} {golo q|,telnet>}
{look %inet_pmt}
{goto bye_inet}
{:ab_cclo} {setv msg, Connection closed by foreign host}
{goto bye_inet}
{:ab_byein} {setv msg, telnet attempt timed out}
{exec-n echo ^(AB^) %_ela %msg >> %_uselog}
{:bye_inet}
{exec-n echo %_dat %_24h%:%_min%:%_sec %msg >> %savedir\nlbbs.por}
{setv port}
{pops}
{setl 30,ab_hu}
{push}
{send %inet_bye|}
{golo q|,telnet>}
{look Leaving %_nam} ;loss of carrier goes to :bya